package com.atguigu.spzx.common.util;

import com.atguigu.spzx.model.entity.system.SysUser;

/**
 * 线程数据绑定的工具类
 */
public class LoginAuthUtil {
    private static final ThreadLocal<SysUser> THREAD_LOCAL  = new ThreadLocal<>();

    public static void  set(SysUser sysUser){
        THREAD_LOCAL.set(sysUser);
    }
    public static SysUser get(){
        return THREAD_LOCAL.get();
    }
    public static void remove(){
        THREAD_LOCAL.remove();
    }

}
